package com.youlu.campus.service.learning;

import com.youlu.campus.entity.ActivityTaskInfo;
import com.youlu.campus.entity.DailyLearning;
import com.youlu.campus.entity.UserDailyLearning;
import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.VO.req.DailyLearningQueryVO;
import com.youlu.campus.entity.VO.req.UserDailyLearningCreateVO;
import com.youlu.campus.entity.domain.PlayBillDomain;
import org.springframework.data.domain.Page;

import java.util.Date;

public interface DailyLearningService {
    /**
     * 获取用户每日学习签到详情
     *
     * @param activityId
     * @param taskInfo
     * @param userId
     * @return
     */
    UserDailyLearning getUserDailyLearning(String activityId, ActivityTaskInfo taskInfo, String userId);

    /**
     * 每日学习签到
     *
     * @param req
     * @return
     */
    boolean signUp(UserDailyLearningCreateVO req);

    DailyLearning getDailyLearning(String activityId, String taskId, Date date);

    UserDailyLearning getUserDailyLearning(String activityId, String taskId, String userId, Date date);

    Page<DailyLearning> list(DailyLearningQueryVO req);

    boolean create(DailyLearning req);

    boolean update(DailyLearning req);

    boolean delete(String id);

    Long getUserDailyLearningCount(UserDailyLearning userDailyLearning);


    PlayBillDomain getPlayBill(UserPO userPO, String id, String appId, String platform);

    void autoCreate();

    boolean deleteByActivityId(String activityId);
}
